#include <gmlib/sm9/internal/sm9_field.h>
#include <stdexcept>
#include <cstring>

using namespace sm9::internal;

void test_sm9_fp_neg()
{
    sm9_fp_t    a, c;
    std::uint8_t c_data[32];

    static std::uint8_t a0[32] = {0x20,0x9d,0x56,0x96,0x8e,0x8c,0x02,0x73,0x7f,0xc2,0x96,0xbd,0x94,0x5c,0x03,0x70,0xa3,0x72,0x57,0xf8,0xe0,0x96,0x1e,0x1e,0x36,0x51,0x1d,0xde,0x23,0x59,0x4b,0xcf};
    static std::uint8_t c0[32] = {0x95,0xa2,0xa9,0x69,0x74,0x17,0xa4,0x7e,0x56,0x41,0x14,0x92,0x61,0x32,0xc3,0xd4,0x7e,0x80,0x3b,0x52,0x39,0xe4,0xd0,0xbd,0xaf,0x1e,0x7d,0x49,0xbf,0xf7,0xf9,0xae};
    sm9_fp_from_bytes(a, a0);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c0, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a1[32] = {0x9f,0x22,0xa8,0x32,0xbe,0xb5,0x7b,0x4d,0xdc,0x96,0xcb,0x92,0x76,0x0d,0xc4,0x16,0xff,0x07,0x81,0xf3,0x50,0x70,0xe8,0xaa,0x2c,0x0d,0x84,0x98,0xd0,0xca,0xdd,0xbf};
    static std::uint8_t c1[32] = {0x17,0x1d,0x57,0xcd,0x43,0xee,0x2b,0xa3,0xf9,0x6c,0xdf,0xbd,0x7f,0x81,0x03,0x2e,0x22,0xeb,0x11,0x57,0xca,0x0a,0x06,0x31,0xb9,0x62,0x16,0x8f,0x12,0x86,0x67,0xbe};
    sm9_fp_from_bytes(a, a1);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c1, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a2[32] = {0xac,0x4d,0x0b,0x78,0x1a,0x0d,0x44,0x84,0x27,0xc2,0x2d,0x14,0x9a,0x1b,0x28,0xa8,0x81,0x83,0x51,0x40,0x20,0x49,0xa1,0x89,0xde,0x9e,0xe0,0x82,0xd3,0x46,0x28,0x3b};
    static std::uint8_t c2[32] = {0x09,0xf2,0xf4,0x87,0xe8,0x96,0x62,0x6d,0xae,0x41,0x7e,0x3b,0x5b,0x73,0x9e,0x9c,0xa0,0x6f,0x42,0x0a,0xfa,0x31,0x4d,0x52,0x06,0xd0,0xba,0xa5,0x10,0x0b,0x1d,0x42};
    sm9_fp_from_bytes(a, a2);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c2, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a3[32] = {0x92,0xca,0xdb,0x05,0xfb,0xa9,0x0c,0x85,0x54,0x3e,0xb6,0xe1,0x27,0xeb,0x4a,0x92,0x26,0x37,0x3c,0x5a,0xa6,0x04,0xbb,0xc7,0xc2,0x25,0x60,0x47,0x3f,0xad,0xac,0x6f};
    static std::uint8_t c3[32] = {0x23,0x75,0x24,0xfa,0x06,0xfa,0x9a,0x6c,0x81,0xc4,0xf4,0x6e,0xcd,0xa3,0x7c,0xb2,0xfb,0xbb,0x56,0xf0,0x74,0x76,0x33,0x14,0x23,0x4a,0x3a,0xe0,0xa3,0xa3,0x99,0x0e};
    sm9_fp_from_bytes(a, a3);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c3, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a4[32] = {0x94,0xf4,0x42,0x9a,0xcd,0x06,0x56,0xe0,0xe8,0x7c,0x2d,0x30,0xfa,0x85,0x1d,0x97,0xd1,0x11,0x78,0xd9,0x07,0x07,0x5e,0x47,0x0a,0xc0,0xcd,0xf3,0x71,0xa8,0x3f,0xee};
    static std::uint8_t c4[32] = {0x21,0x4b,0xbd,0x65,0x35,0x9d,0x50,0x10,0xed,0x87,0x7e,0x1e,0xfb,0x09,0xa9,0xad,0x50,0xe1,0x1a,0x72,0x13,0x73,0x90,0x94,0xda,0xae,0xcd,0x34,0x71,0xa9,0x05,0x8f};
    sm9_fp_from_bytes(a, a4);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c4, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a5[32] = {0x1c,0xa0,0x54,0x15,0x25,0x5d,0x49,0x11,0x18,0x19,0xcc,0xf0,0x83,0xc9,0x14,0x06,0x59,0x7e,0x90,0x36,0xe4,0xd9,0x04,0x9b,0x74,0x89,0xca,0x34,0x05,0xd6,0xf7,0x9c};
    static std::uint8_t c5[32] = {0x99,0x9f,0xab,0xea,0xdd,0x46,0x5d,0xe0,0xbd,0xe9,0xde,0x5f,0x71,0xc5,0xb3,0x3e,0xc8,0x74,0x03,0x14,0x35,0xa1,0xea,0x40,0x70,0xe5,0xd0,0xf3,0xdd,0x7a,0x4d,0xe1};
    sm9_fp_from_bytes(a, a5);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c5, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a6[32] = {0x45,0xdc,0xb1,0x2f,0x2c,0x44,0x19,0x08,0x46,0x0d,0x96,0x10,0x06,0xce,0x25,0xb1,0x3b,0xd6,0x86,0x10,0xed,0x93,0x2a,0x87,0xe4,0x44,0xa7,0x01,0x1c,0xa0,0xa6,0x47};
    static std::uint8_t c6[32] = {0x70,0x63,0x4e,0xd0,0xd6,0x5f,0x8d,0xe9,0x8f,0xf6,0x15,0x3f,0xee,0xc0,0xa1,0x93,0xe6,0x1c,0x0d,0x3a,0x2c,0xe7,0xc4,0x54,0x01,0x2a,0xf4,0x26,0xc6,0xb0,0x9f,0x36};
    sm9_fp_from_bytes(a, a6);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c6, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a7[32] = {0x0f,0xea,0x26,0x61,0x88,0x27,0x90,0x46,0xd0,0x45,0xb1,0x88,0x92,0x46,0x44,0xab,0x04,0xcb,0x71,0x0d,0xd9,0x14,0xfb,0x98,0x56,0x04,0xd2,0x36,0xed,0x68,0x0e,0xb2};
    static std::uint8_t c7[32] = {0xa6,0x55,0xd9,0x9e,0x7a,0x7c,0x16,0xab,0x05,0xbd,0xf9,0xc7,0x63,0x48,0x82,0x9a,0x1d,0x27,0x22,0x3d,0x41,0x65,0xf3,0x43,0x8f,0x6a,0xc8,0xf0,0xf5,0xe9,0x36,0xcb};
    sm9_fp_from_bytes(a, a7);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c7, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a8[32] = {0x60,0x0d,0xa7,0x8f,0x0d,0x85,0x79,0xfb,0xa9,0x99,0xb7,0x7e,0x8c,0x36,0xcc,0xc5,0xba,0x6c,0xb9,0x41,0x88,0x97,0x5b,0xdb,0x86,0x8a,0xcb,0x50,0x24,0x02,0xc0,0xd4};
    static std::uint8_t c8[32] = {0x56,0x32,0x58,0x70,0xf5,0x1e,0x2c,0xf6,0x2c,0x69,0xf3,0xd1,0x69,0x57,0xfa,0x7f,0x67,0x85,0xda,0x09,0x91,0xe3,0x93,0x00,0x5e,0xe4,0xcf,0xd7,0xbf,0x4e,0x84,0xa9};
    sm9_fp_from_bytes(a, a8);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c8, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a9[32] = {0x49,0x22,0x88,0x9a,0x5d,0x17,0x24,0x0d,0x0c,0x1b,0xbd,0x24,0xb6,0x26,0x5b,0x69,0x56,0x13,0x8b,0xed,0xa4,0x4d,0x09,0x84,0xc0,0x42,0x5c,0x9a,0x4d,0x19,0xf3,0xbd};
    static std::uint8_t c9[32] = {0x6d,0x1d,0x77,0x65,0xa5,0x8c,0x82,0xe4,0xc9,0xe7,0xee,0x2b,0x3f,0x68,0x6b,0xdb,0xcb,0xdf,0x07,0x5d,0x76,0x2d,0xe5,0x57,0x25,0x2d,0x3e,0x8d,0x96,0x37,0x51,0xc0};
    sm9_fp_from_bytes(a, a9);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c9, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a10[32] = {0x79,0x5e,0x13,0x5d,0x46,0xe5,0x56,0xef,0x3f,0x26,0xeb,0xc8,0x02,0x4a,0x9c,0xeb,0x20,0x26,0x67,0xf8,0xd2,0xab,0x85,0x8f,0x15,0xf2,0x34,0x0b,0x61,0x18,0xcd,0x54};
    static std::uint8_t c10[32] = {0x3c,0xe1,0xec,0xa2,0xbb,0xbe,0x50,0x02,0x96,0xdc,0xbf,0x87,0xf3,0x44,0x2a,0x5a,0x01,0xcc,0x2b,0x52,0x47,0xcf,0x69,0x4c,0xcf,0x7d,0x67,0x1c,0x82,0x38,0x78,0x29};
    sm9_fp_from_bytes(a, a10);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c10, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a11[32] = {0x78,0xa8,0x72,0x46,0x1a,0xfd,0xd2,0x37,0x39,0x72,0x45,0x67,0x56,0x3d,0x27,0x9f,0x03,0xa0,0xec,0x1e,0x39,0xb6,0xf3,0xfc,0xac,0x47,0x77,0x98,0x19,0x2b,0x99,0x41};
    static std::uint8_t c11[32] = {0x3d,0x97,0x8d,0xb9,0xe7,0xa5,0xd4,0xba,0x9c,0x91,0x65,0xe8,0x9f,0x51,0x9f,0xa6,0x1e,0x51,0xa7,0x2c,0xe0,0xc3,0xfa,0xdf,0x39,0x28,0x23,0x8f,0xca,0x25,0xac,0x3c};
    sm9_fp_from_bytes(a, a11);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c11, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a12[32] = {0x5a,0x08,0xfe,0xeb,0xd7,0x46,0xa0,0x7e,0x01,0x5a,0xf6,0x96,0xa1,0x67,0xf7,0x51,0x2b,0x72,0x49,0xae,0xfb,0x83,0x1e,0x56,0x54,0x65,0x9e,0xc7,0xc0,0x67,0xad,0xe8};
    static std::uint8_t c12[32] = {0x5c,0x37,0x01,0x14,0x2b,0x5d,0x06,0x73,0xd4,0xa8,0xb4,0xb9,0x54,0x26,0xcf,0xf3,0xf6,0x80,0x49,0x9c,0x1e,0xf7,0xd0,0x85,0x91,0x09,0xfc,0x60,0x22,0xe9,0x97,0x95};
    sm9_fp_from_bytes(a, a12);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c12, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a13[32] = {0x65,0xd3,0x2f,0x6d,0x1e,0xb1,0x53,0x13,0x9d,0xb5,0xd3,0xa7,0x22,0x7c,0xdc,0xa7,0x99,0x64,0x40,0x6c,0x4b,0x19,0x45,0x7a,0x64,0x3a,0x04,0x49,0x1a,0x7f,0x51,0x6a};
    static std::uint8_t c13[32] = {0x50,0x6c,0xd0,0x92,0xe3,0xf2,0x53,0xde,0x38,0x4d,0xd7,0xa8,0xd3,0x11,0xea,0x9d,0x88,0x8e,0x52,0xde,0xcf,0x61,0xa9,0x61,0x81,0x35,0x96,0xde,0xc8,0xd1,0xf4,0x13};
    sm9_fp_from_bytes(a, a13);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c13, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a14[32] = {0x58,0xc9,0x71,0xf7,0x07,0xa7,0x67,0x13,0x40,0xb9,0xdd,0x35,0xbc,0x1f,0xba,0x24,0x2c,0x05,0x34,0x7e,0x81,0x94,0x2d,0x29,0x0b,0xf8,0x07,0x16,0x14,0xf7,0x93,0x04};
    static std::uint8_t c14[32] = {0x5d,0x76,0x8e,0x08,0xfa,0xfc,0x3f,0xde,0x95,0x49,0xce,0x1a,0x39,0x6f,0x0d,0x20,0xf5,0xed,0x5e,0xcc,0x98,0xe6,0xc1,0xb2,0xd9,0x77,0x94,0x11,0xce,0x59,0xb2,0x79};
    sm9_fp_from_bytes(a, a14);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c14, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a15[32] = {0x30,0xa0,0x01,0x90,0xfa,0xd0,0x28,0x81,0x22,0x21,0x1f,0x0e,0x6b,0x8d,0x46,0x40,0xcc,0x31,0x5f,0x99,0xd3,0xc7,0xbb,0x3d,0xbf,0x11,0xb1,0x51,0x9f,0xb8,0x56,0x0a};
    static std::uint8_t c15[32] = {0x85,0x9f,0xfe,0x6f,0x07,0xd3,0x7e,0x70,0xb3,0xe2,0x8c,0x41,0x8a,0x01,0x81,0x04,0x55,0xc1,0x33,0xb1,0x46,0xb3,0x33,0x9e,0x26,0x5d,0xe9,0xd6,0x43,0x98,0xef,0x73};
    sm9_fp_from_bytes(a, a15);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c15, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a16[32] = {0x15,0xa4,0x2f,0x5d,0x01,0x0c,0x35,0x07,0xbf,0xc9,0xec,0x0e,0x1c,0xeb,0x33,0x6d,0x6d,0xb4,0xaa,0x7b,0xd1,0xda,0x52,0xfb,0x2e,0xda,0xaf,0x33,0x9a,0x46,0xd2,0x16};
    static std::uint8_t c16[32] = {0xa0,0x9b,0xd0,0xa3,0x01,0x97,0x71,0xea,0x16,0x39,0xbf,0x41,0xd8,0xa3,0x93,0xd7,0xb4,0x3d,0xe8,0xcf,0x48,0xa0,0x9b,0xe0,0xb6,0x94,0xeb,0xf4,0x49,0x0a,0x73,0x67};
    sm9_fp_from_bytes(a, a16);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c16, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a17[32] = {0x54,0xcc,0xa7,0x8b,0x24,0xd8,0x70,0x7c,0x0e,0x82,0x14,0xab,0x1f,0x84,0x9b,0x55,0xb6,0xcf,0x64,0x53,0xb9,0x53,0x24,0xe2,0x6c,0x19,0xd1,0x4f,0xed,0x62,0x5b,0xf1};
    static std::uint8_t c17[32] = {0x61,0x73,0x58,0x74,0xdd,0xcb,0x36,0x75,0xc7,0x81,0x96,0xa4,0xd6,0x0a,0x2b,0xef,0x6b,0x23,0x2e,0xf7,0x61,0x27,0xc9,0xf9,0x79,0x55,0xc9,0xd7,0xf5,0xee,0xe9,0x8c};
    sm9_fp_from_bytes(a, a17);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c17, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a18[32] = {0x48,0xab,0xb6,0x15,0xeb,0x56,0x21,0x22,0xd8,0xe0,0xf6,0x21,0x01,0x15,0xca,0x1f,0x8d,0xae,0x1e,0xee,0xf3,0xa6,0xcb,0x41,0x16,0x01,0x84,0x66,0x77,0x16,0x1d,0x8b};
    static std::uint8_t c18[32] = {0x6d,0x94,0x49,0xea,0x17,0x4d,0x85,0xce,0xfd,0x22,0xb5,0x2e,0xf4,0x78,0xfd,0x25,0x94,0x44,0x74,0x5c,0x26,0xd4,0x23,0x9a,0xcf,0x6e,0x16,0xc1,0x6c,0x3b,0x27,0xf2};
    sm9_fp_from_bytes(a, a18);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c18, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a19[32] = {0x7a,0x11,0x32,0x52,0xa9,0x0b,0xa8,0xb6,0xf1,0x1d,0xe4,0x84,0x68,0x04,0x56,0xb1,0xbf,0x53,0x37,0x11,0x6a,0x45,0xd3,0xae,0xec,0xcb,0xad,0x13,0x56,0xf7,0x13,0xb0};
    static std::uint8_t c19[32] = {0x3c,0x2e,0xcd,0xad,0x59,0x97,0xfe,0x3a,0xe4,0xe5,0xc6,0xcb,0x8d,0x8a,0x70,0x93,0x62,0x9f,0x5c,0x39,0xb0,0x35,0x1b,0x2c,0xf8,0xa3,0xee,0x14,0x8c,0x5a,0x31,0xcd};
    sm9_fp_from_bytes(a, a19);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c19, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a20[32] = {0x05,0x7c,0xdc,0x5d,0x31,0xdf,0x69,0xc6,0x99,0x51,0x6c,0x29,0x0b,0x00,0x32,0x06,0x87,0x3d,0x45,0xd9,0x7b,0x7a,0xf7,0xb3,0x26,0xc9,0x6c,0x72,0x51,0xc7,0xd4,0x30};
    static std::uint8_t c20[32] = {0xb0,0xc3,0x23,0xa2,0xd0,0xc4,0x3d,0x2b,0x3c,0xb2,0x3f,0x26,0xea,0x8e,0x95,0x3e,0x9a,0xb5,0x4d,0x71,0x9e,0xff,0xf7,0x28,0xbe,0xa6,0x2e,0xb5,0x91,0x89,0x71,0x4d};
    sm9_fp_from_bytes(a, a20);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c20, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a21[32] = {0x77,0x20,0x1f,0xe3,0xa0,0xa6,0xea,0xff,0x75,0x58,0xd4,0xb5,0xb9,0xb9,0x73,0xb9,0xe4,0x70,0x28,0xe9,0xe1,0x5f,0x4c,0x81,0x79,0x27,0x33,0xab,0x2a,0x37,0x95,0xe5};
    static std::uint8_t c21[32] = {0x3f,0x1f,0xe0,0x1c,0x61,0xfc,0xbb,0xf2,0x60,0xaa,0xd6,0x9a,0x3b,0xd5,0x53,0x8b,0x3d,0x82,0x6a,0x61,0x39,0x1b,0xa2,0x5a,0x6c,0x48,0x67,0x7c,0xb9,0x19,0xaf,0x98};
    sm9_fp_from_bytes(a, a21);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c21, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a22[32] = {0x5a,0x66,0x7a,0x38,0x95,0x7d,0x17,0x99,0xfb,0x33,0xd8,0xbf,0xb6,0xd6,0xdb,0x77,0x5f,0x60,0xf1,0x68,0xe6,0xcf,0xcc,0x6e,0x8b,0x3c,0xec,0xb5,0x9c,0xbb,0xbe,0x0c};
    static std::uint8_t c22[32] = {0x5b,0xd9,0x85,0xc7,0x6d,0x26,0x8f,0x57,0xda,0xcf,0xd2,0x90,0x3e,0xb7,0xeb,0xcd,0xc2,0x91,0xa1,0xe2,0x33,0xab,0x22,0x6d,0x5a,0x32,0xae,0x72,0x46,0x95,0x87,0x71};
    sm9_fp_from_bytes(a, a22);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c22, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a23[32] = {0x13,0x7f,0xfc,0x91,0x22,0xb3,0xe8,0x6f,0xdc,0x99,0x01,0x5b,0x87,0x0e,0x7f,0xd1,0x1d,0xae,0x97,0x91,0x1a,0x5d,0x0a,0x7a,0x43,0xdc,0xbd,0xe2,0xa5,0x05,0x66,0x61};
    static std::uint8_t c23[32] = {0xa2,0xc0,0x03,0x6e,0xdf,0xef,0xbe,0x81,0xf9,0x6a,0xa9,0xf4,0x6e,0x80,0x47,0x74,0x04,0x43,0xfb,0xba,0x00,0x1d,0xe4,0x61,0xa1,0x92,0xdd,0x45,0x3e,0x4b,0xdf,0x1c};
    sm9_fp_from_bytes(a, a23);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c23, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a24[32] = {0x5c,0x8a,0x78,0x1a,0x4b,0x01,0xb5,0x56,0x7f,0xc2,0x5a,0x39,0x75,0xf0,0xda,0xbd,0xee,0x82,0x2c,0x89,0x34,0x09,0x65,0xa8,0x80,0x11,0x9c,0x7c,0x64,0xff,0xe7,0xc6};
    static std::uint8_t c24[32] = {0x59,0xb5,0x87,0xe5,0xb7,0xa1,0xf1,0x9b,0x56,0x41,0x51,0x16,0x7f,0x9d,0xec,0x87,0x33,0x70,0x66,0xc1,0xe6,0x71,0x89,0x33,0x65,0x5d,0xfe,0xab,0x7e,0x51,0x5d,0xb7};
    sm9_fp_from_bytes(a, a24);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c24, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a25[32] = {0x92,0x19,0xb5,0xa4,0x00,0x21,0xa9,0x6c,0x91,0x89,0x61,0xfb,0x3b,0x21,0x2a,0xae,0x64,0xa7,0xec,0x08,0xc2,0x4e,0xde,0x94,0x9e,0xc2,0x63,0x9d,0x25,0x01,0x44,0x53};
    static std::uint8_t c25[32] = {0x24,0x26,0x4a,0x5c,0x02,0x81,0xfd,0x85,0x44,0x7a,0x49,0x54,0xba,0x6d,0x9c,0x96,0xbd,0x4a,0xa7,0x42,0x58,0x2c,0x10,0x47,0x46,0xad,0x37,0x8a,0xbe,0x50,0x01,0x2a};
    sm9_fp_from_bytes(a, a25);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c25, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a26[32] = {0x97,0xc7,0x0b,0xa6,0xd5,0xd2,0x4b,0xc5,0xd2,0x2d,0x86,0x41,0x9f,0x42,0xf8,0xf3,0x77,0xe3,0x37,0x88,0x0d,0xcc,0x00,0xff,0x84,0xf5,0xc2,0x19,0x5c,0xa4,0x42,0xc0};
    static std::uint8_t c26[32] = {0x1e,0x78,0xf4,0x59,0x2c,0xd1,0x5b,0x2c,0x03,0xd6,0x25,0x0e,0x56,0x4b,0xce,0x51,0xaa,0x0f,0x5b,0xc3,0x0c,0xae,0xed,0xdc,0x60,0x79,0xd9,0x0e,0x86,0xad,0x02,0xbd};
    sm9_fp_from_bytes(a, a26);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c26, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a27[32] = {0x75,0x18,0xe8,0x9b,0x55,0x2f,0x32,0xbd,0x27,0x6e,0x4a,0x40,0x31,0xa7,0x9a,0x55,0x94,0x27,0xdf,0xb0,0x2b,0x4e,0x39,0x96,0xe9,0xab,0x8a,0x2f,0x72,0xce,0x7c,0x31};
    static std::uint8_t c27[32] = {0x41,0x27,0x17,0x64,0xad,0x74,0x74,0x34,0xae,0x95,0x61,0x0f,0xc3,0xe7,0x2c,0xef,0x8d,0xca,0xb3,0x9a,0xef,0x2c,0xb5,0x44,0xfb,0xc4,0x10,0xf8,0x70,0x82,0xc9,0x4c};
    sm9_fp_from_bytes(a, a27);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c27, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a28[32] = {0x04,0x37,0x7d,0x76,0x7f,0xcb,0x64,0x76,0x9f,0x30,0xfe,0xde,0xe0,0x04,0xd5,0x0f,0xaa,0xfc,0xc0,0x24,0xf8,0xce,0xf0,0xb3,0x92,0xd2,0x4b,0x04,0xd8,0xa8,0x89,0xbb};
    static std::uint8_t c28[32] = {0xb2,0x08,0x82,0x89,0x82,0xd8,0x42,0x7b,0x36,0xd2,0xac,0x71,0x15,0x89,0xf2,0x35,0x76,0xf5,0xd3,0x26,0x21,0xab,0xfe,0x28,0x52,0x9d,0x50,0x23,0x0a,0xa8,0xbb,0xc2};
    sm9_fp_from_bytes(a, a28);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c28, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a29[32] = {0x84,0x88,0x48,0x5c,0x4d,0xd0,0xf6,0xb6,0x26,0x8a,0x13,0xc2,0x7b,0x4c,0xb7,0xa1,0xda,0xc2,0x27,0xa2,0x02,0x29,0x74,0x31,0x5a,0xe1,0x8c,0x9a,0x42,0x5e,0x78,0xce};
    static std::uint8_t c29[32] = {0x31,0xb7,0xb7,0xa3,0xb4,0xd2,0xb0,0x3b,0xaf,0x79,0x97,0x8d,0x7a,0x42,0x0f,0xa3,0x47,0x30,0x6b,0xa9,0x18,0x51,0x7a,0xaa,0x8a,0x8e,0x0e,0x8d,0xa0,0xf2,0xcc,0xaf};
    sm9_fp_from_bytes(a, a29);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c29, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a30[32] = {0x27,0xf3,0x6e,0x0c,0x85,0xb8,0x0e,0xf9,0xb6,0x4e,0xbf,0x38,0x41,0x24,0x0b,0x53,0x5d,0xe8,0x20,0x42,0x1a,0xc4,0x88,0xc6,0xf2,0x1c,0x23,0xb9,0x53,0x28,0xe3,0x2a};
    static std::uint8_t c30[32] = {0x8e,0x4c,0x91,0xf3,0x7c,0xeb,0x97,0xf8,0x1f,0xb4,0xec,0x17,0xb4,0x6a,0xbb,0xf1,0xc4,0x0a,0x73,0x08,0xff,0xb6,0x66,0x14,0xf3,0x53,0x77,0x6e,0x90,0x28,0x62,0x53};
    sm9_fp_from_bytes(a, a30);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c30, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a31[32] = {0xa0,0x94,0x82,0xf7,0x54,0x77,0x0f,0x28,0xfb,0x1f,0x2c,0x43,0xf9,0x7a,0x3d,0xa7,0x58,0x36,0x3e,0x21,0xa5,0x67,0x2c,0xd4,0xfb,0xd2,0x54,0x61,0xbd,0x53,0x54,0xf1};
    static std::uint8_t c31[32] = {0x15,0xab,0x7d,0x08,0xae,0x2c,0x97,0xc8,0xda,0xe4,0x7f,0x0b,0xfc,0x14,0x89,0x9d,0xc9,0xbc,0x55,0x29,0x75,0x13,0xc2,0x06,0xe9,0x9d,0x46,0xc6,0x25,0xfd,0xf0,0x8c};
    sm9_fp_from_bytes(a, a31);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c31, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a32[32] = {0xac,0xa4,0xe8,0x4f,0xee,0x95,0x01,0x18,0xf1,0x45,0x44,0xeb,0xcd,0x12,0xdc,0xc2,0xc6,0x0f,0x49,0xb5,0x30,0xe8,0xb6,0x8f,0x69,0x9f,0x82,0xdd,0x6b,0x9b,0xb1,0xb5};
    static std::uint8_t c32[32] = {0x09,0x9b,0x17,0xb0,0x14,0x0e,0xa5,0xd8,0xe4,0xbe,0x66,0x64,0x28,0x7b,0xea,0x82,0x5b,0xe3,0x49,0x95,0xe9,0x92,0x38,0x4c,0x7b,0xd0,0x18,0x4a,0x77,0xb5,0x93,0xc8};
    sm9_fp_from_bytes(a, a32);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c32, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a33[32] = {0x15,0xcd,0x8b,0x8f,0x23,0xce,0xba,0x00,0x52,0x3e,0x55,0x5a,0xec,0xa8,0xa0,0xd0,0x89,0x5f,0xee,0x27,0x77,0xb1,0x2f,0xab,0xad,0xfa,0xde,0x6b,0x4e,0xe3,0xa1,0x27};
    static std::uint8_t c33[32] = {0xa0,0x72,0x74,0x70,0xde,0xd4,0xec,0xf1,0x83,0xc5,0x55,0xf5,0x08,0xe6,0x26,0x74,0x98,0x92,0xa5,0x23,0xa2,0xc9,0xbf,0x30,0x37,0x74,0xbc,0xbc,0x94,0x6d,0xa4,0x56};
    sm9_fp_from_bytes(a, a33);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c33, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a34[32] = {0x25,0xce,0xdc,0x43,0x4a,0x03,0x5e,0x3c,0x10,0xf5,0xeb,0x0b,0x9a,0xad,0x30,0xc0,0x46,0x3b,0x47,0xb0,0x87,0xd9,0x61,0xd1,0x39,0x4a,0x7e,0x0a,0x73,0x13,0x40,0xaa};
    static std::uint8_t c34[32] = {0x90,0x71,0x23,0xbc,0xb8,0xa0,0x48,0xb5,0xc5,0x0d,0xc0,0x44,0x5a,0xe1,0x96,0x84,0xdb,0xb7,0x4b,0x9a,0x92,0xa1,0x8d,0x0a,0xac,0x25,0x1d,0x1d,0x70,0x3e,0x04,0xd3};
    sm9_fp_from_bytes(a, a34);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c34, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a35[32] = {0x75,0x7e,0x66,0x03,0x2d,0x9e,0x54,0x6a,0x3e,0x85,0xab,0x04,0x8c,0x69,0x3a,0x16,0xde,0x87,0xee,0x68,0x51,0xb9,0x6f,0x0a,0x5b,0x3e,0x30,0x36,0x86,0x3a,0x6a,0x81};
    static std::uint8_t c35[32] = {0x40,0xc1,0x99,0xfc,0xd5,0x05,0x52,0x87,0x97,0x7e,0x00,0x4b,0x69,0x25,0x8d,0x2e,0x43,0x6a,0xa4,0xe2,0xc8,0xc1,0x7f,0xd1,0x8a,0x31,0x6a,0xf1,0x5d,0x16,0xda,0xfc};
    sm9_fp_from_bytes(a, a35);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c35, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a36[32] = {0x91,0x01,0x10,0x9d,0x7d,0x43,0x6e,0x7a,0xc6,0x86,0xef,0x7f,0xb9,0x3c,0x02,0x3a,0xe8,0xcb,0x5b,0x7e,0xf4,0x67,0xc7,0xfa,0x94,0xa4,0x2a,0x15,0x57,0xee,0x33,0xd6};
    static std::uint8_t c36[32] = {0x25,0x3e,0xef,0x62,0x85,0x60,0x38,0x77,0x0f,0x7c,0xbb,0xd0,0x3c,0x52,0xc5,0x0a,0x39,0x27,0x37,0xcc,0x26,0x13,0x26,0xe1,0x50,0xcb,0x71,0x12,0x8b,0x63,0x11,0xa7};
    sm9_fp_from_bytes(a, a36);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c36, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a37[32] = {0x16,0xbc,0x1c,0x2d,0xa4,0x92,0x9d,0x20,0x60,0xf7,0x74,0xa7,0x98,0xe6,0x8e,0x0d,0x6b,0x11,0x81,0x61,0x29,0x6f,0x6b,0x9c,0x4f,0x46,0x9e,0x25,0x24,0x40,0xec,0x57};
    static std::uint8_t c37[32] = {0x9f,0x83,0xe3,0xd2,0x5e,0x11,0x09,0xd1,0x75,0x0c,0x36,0xa8,0x5c,0xa8,0x39,0x37,0xb6,0xe1,0x11,0xe9,0xf1,0x0b,0x83,0x3f,0x96,0x28,0xfd,0x02,0xbf,0x10,0x59,0x26};
    sm9_fp_from_bytes(a, a37);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c37, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a38[32] = {0x98,0x90,0x90,0x02,0x6e,0xc6,0xec,0x9e,0xa6,0x3d,0x3e,0xd1,0x85,0x90,0x62,0x94,0x94,0x1c,0xb9,0x8e,0x3d,0xa5,0xb0,0xac,0x44,0x78,0x95,0x10,0x49,0x73,0x44,0x04};
    static std::uint8_t c38[32] = {0x1d,0xaf,0x6f,0xfd,0x93,0xdc,0xba,0x53,0x2f,0xc6,0x6c,0x7e,0x6f,0xfe,0x64,0xb0,0x8d,0xd5,0xd9,0xbc,0xdc,0xd5,0x3e,0x2f,0xa0,0xf7,0x06,0x17,0x99,0xde,0x01,0x79};
    sm9_fp_from_bytes(a, a38);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c38, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a39[32] = {0x33,0x9f,0xc0,0x2d,0x88,0x65,0xb5,0xd6,0x0c,0x3e,0x24,0x66,0x6e,0x80,0xc0,0x4a,0x38,0xc3,0x22,0xa4,0x99,0x04,0x8e,0x9b,0x79,0x8b,0x88,0xc5,0x5d,0x94,0x6e,0x46};
    static std::uint8_t c39[32] = {0x82,0xa0,0x3f,0xd2,0x7a,0x3d,0xf1,0x1b,0xc9,0xc5,0x86,0xe9,0x87,0x0e,0x06,0xfa,0xe9,0x2f,0x70,0xa6,0x81,0x76,0x60,0x40,0x6b,0xe4,0x12,0x62,0x85,0xbc,0xd7,0x37};
    sm9_fp_from_bytes(a, a39);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c39, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a40[32] = {0x0c,0x62,0x16,0x39,0xbd,0x19,0x52,0x7a,0xf7,0xae,0x8e,0xc2,0x84,0x3c,0xb7,0x81,0xfd,0x2c,0x38,0x75,0x38,0x2c,0x49,0x89,0xab,0xa9,0xd5,0xc3,0x5a,0x40,0x27,0xa3};
    static std::uint8_t c40[32] = {0xa9,0xdd,0xe9,0xc6,0x45,0x8a,0x54,0x76,0xde,0x55,0x1c,0x8d,0x71,0x52,0x0f,0xc3,0x24,0xc6,0x5a,0xd5,0xe2,0x4e,0xa5,0x52,0x39,0xc5,0xc5,0x64,0x89,0x11,0x1d,0xda};
    sm9_fp_from_bytes(a, a40);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c40, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a41[32] = {0x0e,0xa9,0x8d,0x4a,0x75,0x34,0x89,0x94,0xbd,0xaf,0x35,0x26,0x97,0xb0,0x83,0x96,0xc0,0x51,0x61,0xe0,0xd1,0xf0,0xed,0x71,0x17,0x69,0xec,0x5c,0xe4,0x09,0xc9,0x3d};
    static std::uint8_t c41[32] = {0xa7,0x96,0x72,0xb5,0x8d,0x6f,0x1d,0x5d,0x18,0x54,0x76,0x29,0x5d,0xde,0x43,0xae,0x61,0xa1,0x31,0x6a,0x48,0x8a,0x01,0x6a,0xce,0x05,0xae,0xca,0xff,0x47,0x7c,0x40};
    sm9_fp_from_bytes(a, a41);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c41, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a42[32] = {0x9c,0xf4,0xc5,0x1e,0xbe,0x64,0x2b,0xa0,0xf5,0xaf,0xf1,0x38,0x5b,0x7c,0x80,0x9e,0xca,0x3e,0xcc,0xed,0x65,0x11,0xcd,0x49,0x42,0xc0,0x08,0x0a,0x22,0x1d,0x16,0xef};
    static std::uint8_t c42[32] = {0x19,0x4b,0x3a,0xe1,0x44,0x3f,0x7b,0x50,0xe0,0x53,0xba,0x17,0x9a,0x12,0x46,0xa6,0x57,0xb3,0xc6,0x5d,0xb5,0x69,0x21,0x92,0xa2,0xaf,0x93,0x1d,0xc1,0x34,0x2e,0x8e};
    sm9_fp_from_bytes(a, a42);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c42, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a43[32] = {0x64,0x6a,0x9f,0x6e,0x9b,0x5e,0x12,0xad,0x5e,0x5d,0x4d,0x7e,0x8c,0xf3,0xb8,0x46,0x1b,0x78,0x32,0xf8,0x6a,0x31,0xdd,0x90,0x2e,0xde,0xbf,0x4a,0x72,0x42,0x69,0xa8};
    static std::uint8_t c43[32] = {0x51,0xd5,0x60,0x91,0x67,0x45,0x94,0x44,0x77,0xa6,0x5d,0xd1,0x68,0x9b,0x0e,0xff,0x06,0x7a,0x60,0x52,0xb0,0x49,0x11,0x4b,0xb6,0x90,0xdb,0xdd,0x71,0x0e,0xdb,0xd5};
    sm9_fp_from_bytes(a, a43);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c43, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a44[32] = {0xb0,0x5d,0x4c,0xe0,0xc6,0xfc,0x51,0xe3,0x11,0xf9,0x92,0xc7,0xac,0x65,0x35,0xec,0x8a,0x9d,0x43,0x78,0x0e,0x8f,0xba,0xa0,0x9f,0xe6,0x4c,0x22,0x60,0x3f,0x4f,0xee};
    static std::uint8_t c44[32] = {0x05,0xe2,0xb3,0x1f,0x3b,0xa7,0x55,0x0e,0xc4,0x0a,0x18,0x88,0x49,0x29,0x91,0x58,0x97,0x55,0x4f,0xd3,0x0b,0xeb,0x34,0x3b,0x45,0x89,0x4f,0x05,0x83,0x11,0xf5,0x8f};
    sm9_fp_from_bytes(a, a44);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c44, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a45[32] = {0x6d,0x79,0x12,0x30,0x9f,0x6b,0x80,0xdf,0xd7,0xee,0x77,0xa2,0xe0,0x1d,0x61,0x32,0x0c,0xa5,0x2e,0x02,0x2f,0xb2,0xcd,0x2b,0x04,0x8f,0xae,0x04,0x12,0xbf,0x6c,0x82};
    static std::uint8_t c45[32] = {0x48,0xc6,0xed,0xcf,0x63,0x38,0x26,0x11,0xfe,0x15,0x33,0xad,0x15,0x71,0x66,0x13,0x15,0x4d,0x65,0x48,0xea,0xc8,0x21,0xb0,0xe0,0xdf,0xed,0x23,0xd0,0x91,0xd8,0xfb};
    sm9_fp_from_bytes(a, a45);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c45, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a46[32] = {0x38,0xef,0xaa,0x94,0x4c,0x04,0x8f,0x7b,0xdc,0x4f,0xb1,0x2a,0x87,0x0a,0x3a,0xa2,0x07,0xa3,0xc0,0x60,0xa2,0x5d,0x1c,0x98,0x30,0x63,0x4e,0x1e,0x64,0xba,0x40,0xbf};
    static std::uint8_t c46[32] = {0x7d,0x50,0x55,0x6b,0xb6,0x9f,0x17,0x75,0xf9,0xb3,0xfa,0x25,0x6e,0x84,0x8c,0xa3,0x1a,0x4e,0xd2,0xea,0x78,0x1d,0xd2,0x43,0xb5,0x0c,0x4d,0x09,0x7e,0x97,0x04,0xbe};
    sm9_fp_from_bytes(a, a46);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c46, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a47[32] = {0x6b,0x25,0x8a,0x00,0x3e,0x12,0x7b,0x65,0x69,0x6b,0xd0,0x09,0x32,0x39,0x8b,0xec,0x93,0x1e,0x34,0xa6,0xe5,0x94,0xa5,0x9c,0xc7,0x82,0x45,0x2f,0x0a,0xa5,0x94,0x9d};
    static std::uint8_t c47[32] = {0x4b,0x1a,0x75,0xff,0xc4,0x91,0x2b,0x8c,0x6c,0x97,0xdb,0x46,0xc3,0x55,0x3b,0x58,0x8e,0xd4,0x5e,0xa4,0x34,0xe6,0x49,0x3f,0x1d,0xed,0x55,0xf8,0xd8,0xab,0xb0,0xe0};
    sm9_fp_from_bytes(a, a47);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c47, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a48[32] = {0x87,0xcf,0xa6,0x4f,0x87,0x25,0x80,0x3a,0x08,0x43,0x08,0x13,0xe6,0xb4,0x94,0xe0,0xb4,0x56,0xce,0x15,0xd3,0x53,0xde,0x4e,0x82,0x7c,0x3c,0x46,0x04,0x56,0x9c,0x2c};
    static std::uint8_t c48[32] = {0x2e,0x70,0x59,0xb0,0x7b,0x7e,0x26,0xb7,0xcd,0xc0,0xa3,0x3c,0x0e,0xda,0x32,0x64,0x6d,0x9b,0xc5,0x35,0x47,0x27,0x10,0x8d,0x62,0xf3,0x5e,0xe1,0xde,0xfa,0xa9,0x51};
    sm9_fp_from_bytes(a, a48);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c48, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a49[32] = {0xa4,0x14,0x4e,0x96,0x5d,0x22,0x39,0x8d,0xa3,0x7a,0x02,0x07,0xe1,0x3a,0x20,0xd0,0xcc,0x85,0x33,0xdb,0x36,0x44,0x69,0x69,0xc0,0x53,0x42,0xc3,0x9d,0x10,0x36,0xc4};
    static std::uint8_t c49[32] = {0x12,0x2b,0xb1,0x69,0xa5,0x81,0x6d,0x64,0x32,0x89,0xa9,0x48,0x14,0x54,0xa6,0x74,0x55,0x6d,0x5f,0x6f,0xe4,0x36,0x85,0x72,0x25,0x1c,0x58,0x64,0x46,0x41,0x0e,0xb9};
    sm9_fp_from_bytes(a, a49);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c49, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a50[32] = {0xa2,0x24,0xca,0x96,0x4d,0x7a,0x93,0x87,0x8b,0x0c,0xb3,0xf9,0xdd,0x35,0x25,0x67,0xea,0x86,0x8c,0x6c,0x58,0xee,0xea,0x78,0x40,0x96,0x48,0xb9,0x4f,0x28,0xd1,0x20};
    static std::uint8_t c50[32] = {0x14,0x1b,0x35,0x69,0xb5,0x29,0x13,0x6a,0x4a,0xf6,0xf7,0x56,0x18,0x59,0xa1,0xdd,0x37,0x6c,0x06,0xde,0xc1,0x8c,0x04,0x63,0xa4,0xd9,0x52,0x6e,0x94,0x28,0x74,0x5d};
    sm9_fp_from_bytes(a, a50);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c50, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a51[32] = {0xb4,0x9b,0xf6,0xfa,0xe7,0xf7,0x6b,0x31,0x89,0xc4,0x9f,0x8a,0x86,0x85,0x87,0xea,0x7e,0x37,0xea,0x20,0xfd,0xdd,0x15,0x5b,0xc4,0xb8,0xfc,0xd8,0xef,0xc0,0xec,0x7c};
    static std::uint8_t c51[32] = {0x01,0xa4,0x09,0x05,0x1a,0xac,0x3b,0xc0,0x4c,0x3f,0x0b,0xc5,0x6f,0x09,0x3f,0x5a,0xa3,0xba,0xa9,0x2a,0x1c,0x9d,0xd9,0x80,0x20,0xb6,0x9e,0x4e,0xf3,0x90,0x59,0x01};
    sm9_fp_from_bytes(a, a51);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c51, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a52[32] = {0x8f,0x1b,0x2b,0x6f,0x57,0x50,0x2b,0x35,0xb1,0x36,0xd0,0x81,0x06,0x59,0xf4,0xaa,0x23,0x3a,0x86,0x84,0x5e,0xbd,0x9a,0xdf,0x54,0x57,0xee,0xc7,0x51,0xd4,0x08,0xf7};
    static std::uint8_t c52[32] = {0x27,0x24,0xd4,0x90,0xab,0x53,0x7b,0xbc,0x24,0xcc,0xda,0xce,0xef,0x34,0xd2,0x9a,0xfe,0xb8,0x0c,0xc6,0xbb,0xbd,0x53,0xfc,0x91,0x17,0xac,0x60,0x91,0x7d,0x3c,0x86};
    sm9_fp_from_bytes(a, a52);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c52, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a53[32] = {0x25,0xf1,0x66,0xd9,0xd4,0xb1,0x17,0x5e,0xd7,0x79,0xb9,0x39,0x6d,0xbd,0x63,0xab,0x31,0x90,0x3d,0x23,0x07,0xd2,0x86,0x97,0xa6,0x20,0xdf,0x64,0x7e,0xda,0x63,0x45};
    static std::uint8_t c53[32] = {0x90,0x4e,0x99,0x26,0x2d,0xf2,0x8f,0x92,0xfe,0x89,0xf2,0x16,0x87,0xd1,0x63,0x99,0xf0,0x62,0x56,0x28,0x12,0xa8,0x68,0x44,0x3f,0x4e,0xbb,0xc3,0x64,0x76,0xe2,0x38};
    sm9_fp_from_bytes(a, a53);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c53, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a54[32] = {0x86,0xbd,0x32,0xe3,0x75,0xd9,0xd8,0x25,0xb0,0x7c,0xac,0x29,0x7a,0x38,0x15,0x87,0xa2,0xfd,0xfd,0xb5,0x57,0x71,0x4f,0xcb,0x09,0xe9,0x3f,0x50,0x1d,0x49,0xcc,0x0b};
    static std::uint8_t c54[32] = {0x2f,0x82,0xcd,0x1c,0x8c,0xc9,0xce,0xcc,0x25,0x86,0xff,0x26,0x7b,0x56,0xb1,0xbd,0x7e,0xf4,0x95,0x95,0xc3,0x09,0x9f,0x10,0xdb,0x86,0x5b,0xd7,0xc6,0x07,0x79,0x72};
    sm9_fp_from_bytes(a, a54);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c54, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a55[32] = {0x10,0x27,0x0f,0x50,0x15,0xf9,0x06,0x49,0x90,0xec,0x42,0x26,0xf1,0xe5,0x40,0xf4,0xfa,0x19,0xf8,0xc4,0x81,0x2f,0x3d,0xd0,0x2c,0xa9,0x16,0x1b,0xb5,0x5b,0x43,0x75};
    static std::uint8_t c55[32] = {0xa6,0x18,0xf0,0xaf,0xec,0xaa,0xa0,0xa8,0x45,0x17,0x69,0x29,0x03,0xa9,0x86,0x50,0x27,0xd8,0x9a,0x86,0x99,0x4b,0xb1,0x0b,0xb8,0xc6,0x85,0x0c,0x2d,0xf6,0x02,0x08};
    sm9_fp_from_bytes(a, a55);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c55, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a56[32] = {0x6a,0x0f,0xfc,0xa2,0x56,0x25,0x47,0x8d,0xfa,0x0e,0xa2,0x0b,0x0c,0xcf,0xf6,0x08,0xf7,0xa0,0xfd,0xc1,0x94,0x9c,0xcd,0x67,0xd1,0x00,0xe1,0xc1,0xa5,0x82,0x6d,0xb9};
    static std::uint8_t c56[32] = {0x4c,0x30,0x03,0x5d,0xac,0x7e,0x5f,0x63,0xdb,0xf5,0x09,0x44,0xe8,0xbe,0xd1,0x3c,0x2a,0x51,0x95,0x89,0x85,0xde,0x21,0x74,0x14,0x6e,0xb9,0x66,0x3d,0xce,0xd7,0xc4};
    sm9_fp_from_bytes(a, a56);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c56, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a57[32] = {0x25,0x7c,0xbb,0xdb,0xd6,0xaa,0x21,0x33,0x0a,0xbf,0xe3,0x07,0x6e,0x94,0x19,0xe0,0x9a,0xf7,0xb7,0x4d,0xa0,0x76,0xed,0x24,0x5b,0xbc,0x0f,0xc4,0x58,0x5b,0xec,0x82};
    static std::uint8_t c57[32] = {0x90,0xc3,0x44,0x24,0x2b,0xf9,0x85,0xbe,0xcb,0x43,0xc8,0x48,0x86,0xfa,0xad,0x64,0x86,0xfa,0xdb,0xfd,0x7a,0x04,0x01,0xb7,0x89,0xb3,0x8b,0x63,0x8a,0xf5,0x58,0xfb};
    sm9_fp_from_bytes(a, a57);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c57, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a58[32] = {0x5b,0xd7,0x13,0xea,0x38,0xc8,0x5e,0x0a,0x4a,0x3b,0x74,0x9c,0xc7,0xd9,0xe7,0xc8,0xe2,0x90,0xec,0x18,0xfa,0x87,0x65,0x64,0x3d,0x10,0xbd,0x42,0x4a,0x58,0xdb,0xd0};
    static std::uint8_t c58[32] = {0x5a,0x68,0xec,0x15,0xc9,0xdb,0x48,0xe7,0x8b,0xc8,0x36,0xb3,0x2d,0xb4,0xdf,0x7c,0x3f,0x61,0xa7,0x32,0x1f,0xf3,0x89,0x77,0xa8,0x5e,0xdd,0xe5,0x98,0xf8,0x69,0xad};
    sm9_fp_from_bytes(a, a58);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c58, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a59[32] = {0x16,0x19,0xf2,0x31,0x51,0x82,0x02,0x25,0x88,0xcd,0x72,0x7d,0x65,0x0a,0x68,0x30,0xa4,0xdd,0x23,0x1d,0x6b,0x9e,0xeb,0x0b,0xd1,0x0b,0x0f,0x4b,0x4c,0x24,0x3a,0xe8};
    static std::uint8_t c59[32] = {0xa0,0x26,0x0d,0xce,0xb1,0x21,0xa4,0xcc,0x4d,0x36,0x38,0xd2,0x90,0x84,0x5f,0x14,0x7d,0x15,0x70,0x2d,0xae,0xdc,0x03,0xd0,0x14,0x64,0x8b,0xdc,0x97,0x2d,0x0a,0x95};
    sm9_fp_from_bytes(a, a59);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c59, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a60[32] = {0xb2,0xe7,0xec,0xd9,0x52,0x8d,0x33,0x87,0x09,0x4d,0x05,0x21,0xfe,0x62,0xd2,0x2e,0x47,0x83,0x87,0xe9,0xd3,0xb6,0x5a,0xdb,0xfd,0xc9,0xc0,0xcc,0x5b,0xf7,0x4d,0x30};
    static std::uint8_t c60[32] = {0x03,0x58,0x13,0x26,0xb0,0x16,0x73,0x6a,0xcc,0xb6,0xa6,0x2d,0xf7,0x2b,0xf5,0x16,0xda,0x6f,0x0b,0x61,0x46,0xc4,0x93,0xff,0xe7,0xa5,0xda,0x5b,0x87,0x59,0xf8,0x4d};
    sm9_fp_from_bytes(a, a60);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c60, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a61[32] = {0x25,0x6b,0xfe,0xc9,0xee,0x8f,0x95,0xa1,0xc4,0x1a,0xd6,0xbd,0xeb,0x85,0x83,0x58,0xc6,0x67,0x15,0x9a,0xf7,0xa0,0xc5,0x3f,0xff,0x49,0x37,0xa8,0xde,0x18,0x53,0x77};
    static std::uint8_t c61[32] = {0x90,0xd4,0x01,0x36,0x14,0x14,0x11,0x50,0x11,0xe8,0xd4,0x92,0x0a,0x09,0x43,0xec,0x5b,0x8b,0x7d,0xb0,0x22,0xda,0x29,0x9b,0xe6,0x26,0x63,0x7f,0x05,0x38,0xf2,0x06};
    sm9_fp_from_bytes(a, a61);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c61, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a62[32] = {0x64,0xc6,0x3f,0x64,0xc3,0xfb,0xa1,0x55,0x55,0xce,0xa8,0x05,0xbd,0xed,0x9c,0x8d,0x2b,0xc2,0x34,0x1c,0x20,0xf6,0x92,0xa8,0xe8,0x82,0x41,0xe9,0xb3,0x22,0x36,0x02};
    static std::uint8_t c62[32] = {0x51,0x79,0xc0,0x9b,0x3e,0xa8,0x05,0x9c,0x80,0x35,0x03,0x4a,0x37,0xa1,0x2a,0xb7,0xf6,0x30,0x5f,0x2e,0xf9,0x84,0x5c,0x32,0xfc,0xed,0x59,0x3e,0x30,0x2f,0x0f,0x7b};
    sm9_fp_from_bytes(a, a62);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c62, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a63[32] = {0x0b,0x25,0x8d,0x66,0xec,0x8c,0x01,0x39,0xf4,0xb8,0x60,0xe0,0x6a,0x2d,0xd1,0xf6,0x37,0x8a,0x90,0x1b,0xfc,0x1d,0x5a,0x6a,0x53,0x66,0x9e,0xb8,0x08,0x05,0xa2,0x2d};
    static std::uint8_t c63[32] = {0xab,0x1a,0x72,0x99,0x16,0x17,0xa5,0xb7,0xe1,0x4b,0x4a,0x6f,0x8b,0x60,0xf5,0x4e,0xea,0x68,0x03,0x2f,0x1e,0x5d,0x94,0x71,0x92,0x08,0xfc,0x6f,0xdb,0x4b,0xa3,0x50};
    sm9_fp_from_bytes(a, a63);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c63, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a64[32] = {0x33,0x8b,0x02,0xd1,0x6b,0x42,0x45,0xbe,0xd2,0xd7,0x94,0x2b,0xa0,0x1c,0x0e,0x21,0xee,0xa4,0x9c,0xad,0x23,0x64,0xdc,0x1f,0x71,0xdf,0x3b,0xc9,0x3f,0x99,0x6d,0x5c};
    static std::uint8_t c64[32] = {0x82,0xb4,0xfd,0x2e,0x97,0x61,0x61,0x33,0x03,0x2c,0x17,0x24,0x55,0x72,0xb9,0x23,0x33,0x4d,0xf6,0x9d,0xf7,0x16,0x12,0xbc,0x73,0x90,0x5f,0x5e,0xa3,0xb7,0xd8,0x21};
    sm9_fp_from_bytes(a, a64);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c64, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a65[32] = {0x2b,0x80,0x02,0xdf,0xde,0x8a,0xd9,0x90,0xb4,0x91,0x37,0x2b,0x81,0x5c,0x90,0xea,0x7b,0x93,0x31,0x4f,0x5b,0x9e,0x7f,0xc1,0xdf,0xfd,0x71,0xad,0xe8,0x06,0x47,0xfa};
    static std::uint8_t c65[32] = {0x8a,0xbf,0xfd,0x20,0x24,0x18,0xcd,0x61,0x21,0x72,0x74,0x24,0x74,0x32,0x36,0x5a,0xa6,0x5f,0x61,0xfb,0xbe,0xdc,0x6f,0x1a,0x05,0x72,0x29,0x79,0xfb,0x4a,0xfd,0x83};
    sm9_fp_from_bytes(a, a65);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c65, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a66[32] = {0x5a,0xba,0x68,0xc7,0x07,0x37,0xa2,0x90,0xa3,0x97,0xa0,0xa1,0x5d,0x82,0x02,0xf7,0x53,0x33,0x5d,0x23,0xde,0x93,0x22,0x9b,0x22,0x36,0x76,0x71,0xb5,0x1c,0x3e,0x11};
    static std::uint8_t c66[32] = {0x5b,0x85,0x97,0x38,0xfb,0x6c,0x04,0x61,0x32,0x6c,0x0a,0xae,0x98,0x0c,0xc4,0x4d,0xce,0xbf,0x36,0x27,0x3b,0xe7,0xcc,0x40,0xc3,0x39,0x24,0xb6,0x2e,0x35,0x07,0x6c};
    sm9_fp_from_bytes(a, a66);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c66, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a67[32] = {0x06,0xbb,0x32,0x26,0x89,0x9c,0x1a,0x94,0xff,0x36,0x07,0xec,0x46,0xee,0xbd,0xef,0xb6,0x2f,0x01,0x65,0xcb,0x9f,0x4f,0x89,0xef,0x4f,0x2f,0xa5,0x67,0xe8,0x83,0x9a};
    static std::uint8_t c67[32] = {0xaf,0x84,0xcd,0xd9,0x79,0x07,0x8c,0x5c,0xd6,0xcd,0xa3,0x63,0xae,0xa0,0x09,0x55,0x6b,0xc3,0x91,0xe5,0x4e,0xdb,0x9f,0x51,0xf6,0x20,0x6b,0x82,0x7b,0x68,0xc1,0xe3};
    sm9_fp_from_bytes(a, a67);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c67, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a68[32] = {0x4f,0xad,0x08,0x7f,0x1f,0x96,0x97,0x7b,0x93,0x61,0xbc,0x40,0x88,0x75,0xdc,0xc0,0xc7,0xfe,0x05,0xaf,0x37,0x68,0x1d,0xe0,0x5a,0x6e,0xc7,0x95,0x9f,0x9d,0x5c,0x05};
    static std::uint8_t c68[32] = {0x66,0x92,0xf7,0x80,0xe3,0x0d,0x0f,0x76,0x42,0xa1,0xef,0x0f,0x6d,0x18,0xea,0x84,0x59,0xf4,0x8d,0x9b,0xe3,0x12,0xd0,0xfb,0x8b,0x00,0xd3,0x92,0x43,0xb3,0xe9,0x78};
    sm9_fp_from_bytes(a, a68);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c68, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a69[32] = {0x30,0x07,0xcf,0xcc,0x32,0x81,0xed,0xc7,0x3f,0x5a,0xf2,0x8a,0xdb,0x7e,0x5c,0x62,0x87,0x74,0x50,0x12,0x19,0x7a,0x51,0xfa,0x98,0x03,0x66,0x08,0xde,0xca,0xc0,0x24};
    static std::uint8_t c69[32] = {0x86,0x38,0x30,0x33,0xd0,0x21,0xb9,0x2a,0x96,0xa8,0xb8,0xc5,0x1a,0x10,0x6a,0xe2,0x9a,0x7e,0x43,0x39,0x01,0x00,0x9c,0xe1,0x4d,0x6c,0x35,0x1f,0x04,0x86,0x85,0x59};
    sm9_fp_from_bytes(a, a69);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c69, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a70[32] = {0xb5,0x8e,0x2f,0x27,0x76,0x98,0xe8,0x36,0x78,0x9d,0xc3,0x14,0x45,0x3c,0x17,0x2b,0xa8,0xf3,0x69,0x7c,0x5b,0xf4,0x47,0x25,0x68,0x16,0x22,0xbe,0xc8,0xbd,0xbc,0xc7};
    static std::uint8_t c70[32] = {0x00,0xb1,0xd0,0xd8,0x8c,0x0a,0xbe,0xbb,0x5d,0x65,0xe8,0x3b,0xb0,0x52,0xb0,0x19,0x78,0xff,0x29,0xce,0xbe,0x86,0xa7,0xb6,0x7d,0x59,0x78,0x69,0x1a,0x93,0x88,0xb6};
    sm9_fp_from_bytes(a, a70);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c70, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a71[32] = {0x32,0xb2,0xc4,0xda,0x9e,0xbe,0x0a,0x6b,0x36,0xd1,0x4e,0x26,0x44,0xf9,0x09,0x1b,0xff,0x74,0xb6,0xd3,0x44,0xec,0x2a,0xf0,0x01,0x7f,0x1f,0x0f,0x2b,0x8d,0xd5,0xcb};
    static std::uint8_t c71[32] = {0x83,0x8d,0x3b,0x25,0x63,0xe5,0x9c,0x86,0x9f,0x32,0x5d,0x29,0xb0,0x95,0xbe,0x29,0x22,0x7d,0xdc,0x77,0xd5,0x8e,0xc3,0xeb,0xe3,0xf0,0x7c,0x18,0xb7,0xc3,0x6f,0xb2};
    sm9_fp_from_bytes(a, a71);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c71, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a72[32] = {0x07,0xc0,0x5a,0x53,0x5a,0xf7,0xd8,0x18,0x1c,0x8b,0x71,0x47,0x61,0x66,0xc2,0x57,0x65,0xf7,0x84,0x53,0xe1,0x40,0x77,0xc4,0xc6,0x29,0x04,0x3c,0x5a,0x16,0x53,0x42};
    static std::uint8_t c72[32] = {0xae,0x7f,0xa5,0xac,0xa7,0xab,0xce,0xd9,0xb9,0x78,0x3a,0x08,0x94,0x28,0x04,0xed,0xbb,0xfb,0x0e,0xf7,0x39,0x3a,0x77,0x17,0x1f,0x46,0x96,0xeb,0x89,0x3a,0xf2,0x3b};
    sm9_fp_from_bytes(a, a72);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c72, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a73[32] = {0x0f,0x05,0x74,0x0d,0xf3,0xf5,0x05,0x0d,0xa8,0x40,0x6a,0x47,0x09,0xb2,0xb4,0x24,0xdc,0xc9,0x4c,0xca,0xbd,0xed,0x2d,0x6b,0xb3,0xd2,0x43,0x43,0xd2,0x51,0x6b,0xa9};
    static std::uint8_t c73[32] = {0xa7,0x3a,0x8b,0xf2,0x0e,0xae,0xa1,0xe4,0x2d,0xc3,0x41,0x08,0xeb,0xdc,0x13,0x20,0x45,0x29,0x46,0x80,0x5c,0x8d,0xc1,0x70,0x31,0x9d,0x57,0xe4,0x10,0xff,0xd9,0xd4};
    sm9_fp_from_bytes(a, a73);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c73, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a74[32] = {0x41,0x28,0x85,0xe7,0x54,0xfe,0xa4,0x75,0xac,0xff,0xc3,0xe1,0x37,0x32,0x43,0xd9,0xd4,0xdf,0x86,0x31,0x83,0x6f,0x95,0x7d,0xb3,0x96,0x6e,0x64,0x2a,0x59,0xfc,0xe6};
    static std::uint8_t c74[32] = {0x75,0x17,0x7a,0x18,0xad,0xa5,0x02,0x7c,0x29,0x03,0xe7,0x6e,0xbe,0x5c,0x83,0x6b,0x4d,0x13,0x0d,0x19,0x97,0x0b,0x59,0x5e,0x31,0xd9,0x2c,0xc3,0xb8,0xf7,0x48,0x97};
    sm9_fp_from_bytes(a, a74);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c74, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a75[32] = {0x3b,0xd2,0x30,0xb6,0xb4,0x49,0xec,0xe7,0x95,0x3c,0xa4,0x2c,0x72,0xe6,0xae,0x1a,0x41,0xdb,0x63,0xf3,0x68,0x19,0x5a,0xb5,0xc9,0x74,0x18,0x51,0x7b,0x48,0x36,0x58};
    static std::uint8_t c75[32] = {0x7a,0x6d,0xcf,0x49,0x4e,0x59,0xba,0x0a,0x40,0xc7,0x07,0x23,0x82,0xa8,0x19,0x2a,0xe0,0x17,0x2f,0x57,0xb2,0x61,0x94,0x26,0x1b,0xfb,0x82,0xd6,0x68,0x09,0x0f,0x25};
    sm9_fp_from_bytes(a, a75);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c75, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a76[32] = {0x3f,0xab,0x28,0xa0,0xb5,0x6f,0x0f,0x57,0x87,0xcc,0x7e,0xd1,0x4b,0xd1,0x83,0x8b,0x77,0x88,0xa8,0x34,0xec,0xc1,0x24,0xfa,0x7a,0x01,0x41,0x5b,0x79,0x98,0x00,0xcb};
    static std::uint8_t c76[32] = {0x76,0x94,0xd7,0x5f,0x4d,0x34,0x97,0x9a,0x4e,0x37,0x2c,0x7e,0xa9,0xbd,0x43,0xb9,0xaa,0x69,0xeb,0x16,0x2d,0xb9,0xc9,0xe1,0x6b,0x6e,0x59,0xcc,0x69,0xb9,0x44,0xb2};
    sm9_fp_from_bytes(a, a76);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c76, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a77[32] = {0x90,0x5a,0x6e,0xf6,0xb7,0xe2,0xcc,0x90,0xc6,0x94,0xb3,0xcd,0xb3,0x16,0xdb,0x05,0xc7,0x4d,0xf6,0xd5,0xda,0x57,0xd0,0xab,0x10,0xd2,0x9f,0x97,0xd6,0xaf,0x9a,0x22};
    static std::uint8_t c77[32] = {0x25,0xe5,0x91,0x09,0x4a,0xc0,0xda,0x61,0x0f,0x6e,0xf7,0x82,0x42,0x77,0xec,0x3f,0x5a,0xa4,0x9c,0x75,0x40,0x23,0x1e,0x30,0xd4,0x9c,0xfb,0x90,0x0c,0xa1,0xab,0x5b};
    sm9_fp_from_bytes(a, a77);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c77, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a78[32] = {0x38,0x14,0x80,0x48,0xd2,0xff,0xab,0x47,0x8d,0xa2,0x39,0x07,0x3e,0x0e,0xec,0xa4,0x50,0xee,0x97,0x3d,0x29,0xad,0xce,0x08,0x97,0x50,0xda,0x73,0x19,0x22,0x02,0x94};
    static std::uint8_t c78[32] = {0x7e,0x2b,0x7f,0xb7,0x2f,0xa3,0xfb,0xaa,0x48,0x61,0x72,0x48,0xb7,0x7f,0xda,0xa0,0xd1,0x03,0xfc,0x0d,0xf0,0xcd,0x20,0xd3,0x4e,0x1e,0xc0,0xb4,0xca,0x2f,0x42,0xe9};
    sm9_fp_from_bytes(a, a78);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c78, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a79[32] = {0x24,0xc4,0x51,0xd9,0xc8,0x77,0x00,0xb6,0xb9,0xf1,0x94,0x4f,0x1e,0x5d,0xe2,0xbe,0x9e,0x56,0xa7,0xd9,0xc3,0xed,0xaa,0x31,0x77,0x8e,0x24,0x83,0x4b,0xe6,0xa6,0xd8};
    static std::uint8_t c79[32] = {0x91,0x7b,0xae,0x26,0x3a,0x2c,0xa6,0x3b,0x1c,0x12,0x17,0x00,0xd7,0x30,0xe4,0x86,0x83,0x9b,0xeb,0x71,0x56,0x8d,0x44,0xaa,0x6d,0xe1,0x76,0xa4,0x97,0x6a,0x9e,0xa5};
    sm9_fp_from_bytes(a, a79);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c79, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a80[32] = {0x46,0xb2,0x03,0xbd,0x74,0xf6,0x83,0x91,0x74,0xac,0x30,0x2c,0xa3,0x36,0x14,0xe5,0x69,0x8c,0x89,0xc3,0xcb,0x24,0x76,0x41,0x23,0xa3,0x11,0x46,0x8d,0x4a,0x27,0x14};
    static std::uint8_t c80[32] = {0x6f,0x8d,0xfc,0x42,0x8d,0xad,0x23,0x60,0x61,0x57,0x7b,0x23,0x52,0x58,0xb2,0x5f,0xb8,0x66,0x09,0x87,0x4f,0x56,0x78,0x9a,0xc1,0xcc,0x89,0xe1,0x56,0x07,0x1e,0x69};
    sm9_fp_from_bytes(a, a80);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c80, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a81[32] = {0x1c,0x53,0xac,0x0a,0x84,0xa9,0x08,0xb7,0xaa,0x2d,0x64,0x80,0xb2,0x54,0xdd,0xa2,0xf5,0x04,0x75,0xa1,0x47,0x71,0xb7,0x3a,0x1c,0xd1,0xc4,0x79,0xad,0x21,0xc0,0xe4};
    static std::uint8_t c81[32] = {0x99,0xec,0x53,0xf5,0x7d,0xfa,0x9e,0x3a,0x2b,0xd6,0x46,0xcf,0x43,0x39,0xe9,0xa2,0x2c,0xee,0x1d,0xa9,0xd3,0x09,0x37,0xa1,0xc8,0x9d,0xd6,0xae,0x36,0x2f,0x84,0x99};
    sm9_fp_from_bytes(a, a81);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c81, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a82[32] = {0x3a,0x86,0x5f,0xf7,0x9b,0xd1,0x13,0xe8,0xdd,0x3a,0x3d,0x39,0xce,0xb4,0xe0,0x44,0xd5,0x73,0xc0,0x05,0x9d,0x55,0xac,0x6b,0x31,0xdb,0x98,0x48,0xf1,0xfa,0x53,0x45};
    static std::uint8_t c82[32] = {0x7b,0xb9,0xa0,0x08,0x66,0xd2,0x93,0x08,0xf8,0xc9,0x6e,0x16,0x26,0xd9,0xe7,0x00,0x4c,0x7e,0xd3,0x45,0x7d,0x25,0x42,0x70,0xb3,0x94,0x02,0xde,0xf1,0x56,0xf2,0x38};
    sm9_fp_from_bytes(a, a82);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c82, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a83[32] = {0x05,0xfe,0x02,0xdd,0x28,0x68,0x7d,0x53,0xd8,0xb7,0x74,0x66,0x4b,0xa7,0x4a,0x64,0x71,0x2a,0x60,0x5d,0xed,0xa6,0x99,0x23,0xaf,0x2d,0x7e,0xc2,0x2d,0xa6,0xd9,0x29};
    static std::uint8_t c83[32] = {0xb0,0x41,0xfd,0x22,0xda,0x3b,0x29,0x9d,0xfd,0x4c,0x36,0xe9,0xa9,0xe7,0x7c,0xe0,0xb0,0xc8,0x32,0xed,0x2c,0xd4,0x55,0xb8,0x36,0x42,0x1c,0x65,0xb5,0xaa,0x6c,0x54};
    sm9_fp_from_bytes(a, a83);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c83, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a84[32] = {0x82,0x72,0xb9,0x28,0xaa,0x1f,0xfd,0x95,0x43,0x5f,0x4d,0x33,0x7c,0x6e,0x01,0x5d,0xd0,0x25,0x9c,0xe5,0x5d,0xb2,0xd1,0x07,0xaa,0xb4,0xbd,0x1a,0xc5,0x49,0xee,0x61};
    static std::uint8_t c84[32] = {0x33,0xcd,0x46,0xd7,0x58,0x83,0xa9,0x5c,0x92,0xa4,0x5e,0x1c,0x79,0x20,0xc5,0xe7,0x51,0xcc,0xf6,0x65,0xbc,0xc8,0x1d,0xd4,0x3a,0xba,0xde,0x0d,0x1e,0x07,0x57,0x1c};
    sm9_fp_from_bytes(a, a84);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c84, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a85[32] = {0xb4,0xbc,0xb1,0xbf,0xbb,0xd7,0xb8,0x84,0xca,0xa4,0xb1,0x8b,0xe5,0xf7,0xee,0xfe,0x5c,0x9f,0x00,0x05,0x96,0x5f,0x9c,0x0d,0x60,0x0a,0xcc,0x77,0xf6,0xdb,0x51,0x2b};
    static std::uint8_t c85[32] = {0x01,0x83,0x4e,0x40,0x46,0xcb,0xee,0x6d,0x0b,0x5e,0xf9,0xc4,0x0f,0x96,0xd8,0x46,0xc5,0x53,0x93,0x45,0x84,0x1b,0x52,0xce,0x85,0x64,0xce,0xaf,0xec,0x75,0xf4,0x52};
    sm9_fp_from_bytes(a, a85);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c85, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a86[32] = {0x3d,0xc7,0xfe,0x91,0x07,0x1b,0x60,0x38,0x29,0xaf,0x0e,0x4b,0xb1,0x35,0xbd,0x41,0x46,0xcb,0x24,0xb7,0x9d,0x02,0x87,0x1c,0x8a,0xd8,0x90,0xd0,0x34,0x56,0x2c,0xb5};
    static std::uint8_t c86[32] = {0x78,0x78,0x01,0x6e,0xfb,0x88,0x46,0xb9,0xac,0x54,0x9d,0x04,0x44,0x59,0x0a,0x03,0xdb,0x27,0x6e,0x93,0x7d,0x78,0x67,0xbf,0x5a,0x97,0x0a,0x57,0xae,0xfb,0x18,0xc8};
    sm9_fp_from_bytes(a, a86);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c86, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a87[32] = {0x04,0x91,0x53,0x56,0xdf,0x24,0x98,0xc5,0x46,0x73,0xed,0xd2,0x5e,0x31,0xec,0xfa,0x47,0x16,0xd0,0x4d,0x67,0x42,0x3a,0x51,0x11,0x45,0xfb,0xa6,0x61,0xf9,0x71,0x6c};
    static std::uint8_t c87[32] = {0xb1,0xae,0xac,0xa9,0x23,0x7f,0x0e,0x2c,0x8f,0x8f,0xbd,0x7d,0x97,0x5c,0xda,0x4a,0xda,0xdb,0xc2,0xfd,0xb3,0x38,0xb4,0x8a,0xd4,0x29,0x9f,0x81,0x81,0x57,0xd4,0x11};
    sm9_fp_from_bytes(a, a87);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c87, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a88[32] = {0x55,0xec,0x12,0x9f,0xe8,0x31,0x4a,0x42,0x90,0xd1,0xe6,0xd3,0x3b,0xd7,0x52,0x59,0xe0,0x1f,0x18,0x04,0xeb,0x86,0xaa,0x32,0x43,0x98,0xa5,0xb1,0xba,0xca,0xbb,0x81};
    static std::uint8_t c88[32] = {0x60,0x53,0xed,0x60,0x1a,0x72,0x5c,0xaf,0x45,0x31,0xc4,0x7c,0xb9,0xb7,0x74,0xeb,0x41,0xd3,0x7b,0x46,0x2e,0xf4,0x44,0xa9,0xa1,0xd6,0xf5,0x76,0x28,0x86,0x89,0xfc};
    sm9_fp_from_bytes(a, a88);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c88, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a89[32] = {0x67,0x71,0xf4,0x31,0x57,0x50,0x97,0x89,0x26,0xf2,0x28,0x89,0x83,0xa7,0xb4,0xaa,0x17,0x3a,0xc2,0x8f,0x2f,0x2d,0xe7,0x56,0xfb,0x59,0xd8,0xf3,0xf9,0xf7,0xfd,0x95};
    static std::uint8_t c89[32] = {0x4e,0xce,0x0b,0xce,0xab,0x53,0x0f,0x68,0xaf,0x11,0x82,0xc6,0x71,0xe7,0x12,0x9b,0x0a,0xb7,0xd0,0xbb,0xeb,0x4d,0x07,0x84,0xea,0x15,0xc2,0x33,0xe9,0x59,0x47,0xe8};
    sm9_fp_from_bytes(a, a89);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c89, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a90[32] = {0x77,0xf0,0x6d,0x5c,0x8f,0xfe,0x8d,0xbc,0xe5,0x24,0x1b,0xf0,0x91,0xa4,0x1b,0xda,0xed,0x46,0xc2,0xc9,0x5d,0xfa,0x01,0x09,0xb4,0x47,0x18,0x90,0xd4,0x76,0xa9,0xe0};
    static std::uint8_t c90[32] = {0x3e,0x4f,0x92,0xa3,0x72,0xa5,0x19,0x34,0xf0,0xdf,0x8f,0x5f,0x63,0xea,0xab,0x6a,0x34,0xab,0xd0,0x81,0xbc,0x80,0xed,0xd2,0x31,0x28,0x82,0x97,0x0e,0xda,0x9b,0x9d};
    sm9_fp_from_bytes(a, a90);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c90, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a91[32] = {0x51,0xb1,0x58,0xa2,0x73,0x00,0x21,0xe8,0x14,0x00,0x13,0xb4,0xbc,0x74,0xbb,0x94,0x33,0xfa,0x1f,0x89,0xf5,0x25,0xf9,0x15,0x8d,0x37,0xf3,0x4e,0xbd,0x91,0xd9,0x49};
    static std::uint8_t c91[32] = {0x64,0x8e,0xa7,0x5d,0x8f,0xa3,0x85,0x09,0xc2,0x03,0x97,0x9b,0x39,0x1a,0x0b,0xb0,0xed,0xf8,0x73,0xc1,0x25,0x54,0xf5,0xc6,0x58,0x37,0xa7,0xd9,0x25,0xbf,0x6c,0x34};
    sm9_fp_from_bytes(a, a91);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c91, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a92[32] = {0x1a,0xcc,0xb2,0xf8,0xf7,0x6b,0x9c,0xad,0x89,0x32,0x3a,0x72,0x7a,0x84,0x08,0xc3,0x02,0x06,0xc6,0xc7,0x9f,0x0d,0xd1,0x94,0x94,0x58,0x44,0xc0,0x05,0xe4,0xdd,0x3e};
    static std::uint8_t c92[32] = {0x9b,0x73,0x4d,0x07,0x0b,0x38,0x0a,0x44,0x4c,0xd1,0x70,0xdd,0x7b,0x0a,0xbe,0x82,0x1f,0xeb,0xcc,0x83,0x7b,0x6d,0x1d,0x47,0x51,0x17,0x56,0x67,0xdd,0x6c,0x68,0x3f};
    sm9_fp_from_bytes(a, a92);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c92, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a93[32] = {0x45,0x41,0x94,0x2c,0xf2,0x17,0x58,0xf9,0xe0,0x40,0xc4,0x81,0x8f,0xe3,0x5c,0x8e,0x88,0xc5,0x8f,0xc7,0x04,0x12,0x05,0xf0,0x0f,0xf0,0xad,0x33,0x54,0xbc,0x20,0x3d};
    static std::uint8_t c93[32] = {0x70,0xfe,0x6b,0xd3,0x10,0x8c,0x4d,0xf7,0xf5,0xc2,0xe6,0xce,0x65,0xab,0x6a,0xb6,0x99,0x2d,0x03,0x84,0x16,0x68,0xe8,0xeb,0xd5,0x7e,0xed,0xf4,0x8e,0x95,0x25,0x40};
    sm9_fp_from_bytes(a, a93);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c93, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a94[32] = {0x58,0xbe,0x03,0x79,0x61,0xf0,0x12,0x76,0xda,0xb3,0x56,0x61,0x1c,0xb6,0x28,0x45,0xd7,0x33,0x5c,0x12,0xd2,0x20,0x0a,0x6f,0x73,0xc1,0xd0,0xd7,0x86,0xb0,0x2c,0xb8};
    static std::uint8_t c94[32] = {0x5d,0x81,0xfc,0x86,0xa0,0xb3,0x94,0x7a,0xfb,0x50,0x54,0xee,0xd8,0xd8,0x9e,0xff,0x4a,0xbf,0x37,0x38,0x48,0x5a,0xe4,0x6c,0x71,0xad,0xca,0x50,0x5c,0xa1,0x18,0xc5};
    sm9_fp_from_bytes(a, a94);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c94, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a95[32] = {0x2e,0x78,0x89,0x95,0xe2,0x56,0xe1,0x48,0x85,0x78,0x0a,0x1b,0xb7,0x68,0xcb,0x16,0x98,0xec,0xf5,0xc2,0x9c,0x89,0x57,0x4c,0x99,0x7c,0xf8,0x1a,0x86,0x6d,0x4e,0xce};
    static std::uint8_t c95[32] = {0x87,0xc7,0x76,0x6a,0x20,0x4c,0xc5,0xa9,0x50,0x8b,0xa1,0x34,0x3e,0x25,0xfc,0x2e,0x89,0x05,0x9d,0x88,0x7d,0xf1,0x97,0x8f,0x4b,0xf2,0xa3,0x0d,0x5c,0xe3,0xf6,0xaf};
    sm9_fp_from_bytes(a, a95);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c95, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a96[32] = {0x95,0xbb,0xcb,0xca,0xe3,0xe2,0x78,0x53,0x7a,0x3f,0xd9,0xd2,0x58,0xf1,0xfd,0xe1,0x95,0xa6,0xdd,0x79,0x16,0xe5,0x97,0x9f,0x3b,0xa9,0x58,0xdb,0x19,0x31,0xd7,0xfb};
    static std::uint8_t c96[32] = {0x20,0x84,0x34,0x35,0x1e,0xc1,0x2e,0x9e,0x5b,0xc3,0xd1,0x7d,0x9c,0x9c,0xc9,0x63,0x8c,0x4b,0xb5,0xd2,0x03,0x95,0x57,0x3c,0xa9,0xc6,0x42,0x4c,0xca,0x1f,0x6d,0x82};
    sm9_fp_from_bytes(a, a96);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c96, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a97[32] = {0xa3,0xcf,0x97,0xe4,0x52,0xd4,0x5f,0xa5,0xf2,0xb8,0xce,0x13,0x5b,0xcf,0x04,0xc6,0xd1,0xf2,0x57,0x18,0x88,0x0f,0xf2,0xf3,0x36,0xfc,0x7c,0x76,0x63,0x89,0x8a,0x4e};
    static std::uint8_t c97[32] = {0x12,0x70,0x68,0x1b,0xaf,0xcf,0x47,0x4b,0xe3,0x4a,0xdd,0x3c,0x99,0xbf,0xc2,0x7e,0x50,0x00,0x3c,0x32,0x92,0x6a,0xfb,0xe8,0xae,0x73,0x1e,0xb1,0x7f,0xc7,0xbb,0x2f};
    sm9_fp_from_bytes(a, a97);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c97, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a98[32] = {0x77,0x65,0x29,0x72,0xf9,0xf1,0xda,0x29,0x50,0x4d,0x91,0x26,0xff,0x38,0xaf,0xbf,0xb4,0xeb,0xa1,0xcc,0xb8,0x84,0x77,0x9f,0x1b,0x7c,0x32,0x09,0xb7,0x1c,0x6a,0xa0};
    static std::uint8_t c98[32] = {0x3e,0xda,0xd6,0x8d,0x08,0xb1,0xcc,0xc8,0x85,0xb6,0x1a,0x28,0xf6,0x56,0x17,0x85,0x6d,0x06,0xf1,0x7e,0x61,0xf6,0x77,0x3c,0xc9,0xf3,0x69,0x1e,0x2c,0x34,0xda,0xdd};
    sm9_fp_from_bytes(a, a98);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c98, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
    static std::uint8_t a99[32] = {0x5f,0xa4,0x58,0x51,0xdc,0x56,0xb4,0xa9,0x2f,0x76,0xe8,0x82,0x48,0x80,0x60,0xca,0xf2,0x44,0x59,0x33,0xef,0x50,0xc3,0x2a,0xd9,0xdd,0xa7,0xb7,0x7f,0x90,0x87,0xb8};
    static std::uint8_t c99[32] = {0x56,0x9b,0xa7,0xae,0x26,0x4c,0xf2,0x48,0xa6,0x8c,0xc2,0xcd,0xad,0x0e,0x66,0x7a,0x2f,0xae,0x3a,0x17,0x2b,0x2a,0x2b,0xb1,0x0b,0x91,0xf3,0x70,0x63,0xc0,0xbd,0xc5};
    sm9_fp_from_bytes(a, a99);
    sm9_fp_neg(c, a);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c99, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_neg");
    }
}